<template>

    <div>
        <h2>子组件</h2>
        <label><slot></slot></label>
        <input :value="modelValue" :type="type" 
        @input="emit('update:modelValue',$event.target.value)">
        <input type="text" :value="gender"
        @input="emit('update:gender',$event.target.value)"
        >
        <button @click="emit('click')">OK</button>
    </div>
</template>
<script setup>
import { defineProps,defineEmits } from 'vue';
const props = defineProps(['type','modelValue','gender']);
const emit = defineEmits(['click','update:modelValue','update:gender']);

</script>